package Text2;
import java.util.*;
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] q = new int[n];
        for(int i=0; i<n; i++){q[i] = sc.nextInt();}

        msort(q, 0, n-1);
        for(int i=0; i<n; i++){System.out.print(q[i] + " ");}
    }

    private static void msort(int[] q, int l, int r) {
        if(l>=r){
            return;
        }
        int mid=r+l>>1;
        msort(q, l,mid);
        msort(q, mid+1,r);
        int k=0,i=l,j=mid+1;
        int[] tmp=new int[r-l+1];
        while(i<=mid&&j<=r){
            if(q[i]<q[j]){
                tmp[k++]=q[i++];
            }else {
                tmp[k++]=q[j++];
            }
        }
        while(i<=mid){
            tmp[k++]=q[i++];
        }
        while (j<=r){
            tmp[k++]=q[j++];
        }
        for (int m = 0; m < tmp.length; m++) {
            q[m+l]=tmp[m];
        }
    }
}
